<!DOCTYPE html>
<html lang='en'>
<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no'>
    <title>MLXJSBridge</title>
    <script>
//实例 调起相机  xxxxx  命名空间名字 cameraClick_paramName0_paramName1_
        function clickcamera() {
            var mycars = '{"name":"Runoob", "url":"www.runoob.com","callback":"nativeClickrrrr"}';
            mlxapp.useApp('cameraClick',mycars,function (response) {
                var success = response['success'];
                if(!success){
                    alert(response['msg']);
                     return;
                }
                 //response['data']：回调回来的照片数组
                var photos = response['data'];
                var insert = document.getElementById('insert');
                for(var i = 0; i < photos.length; i++) {
                    var img = new Image(100,100);
                    img.src = photos[i];
                    insert.appendChild(img);
                }
            });
        }
        function nativeClick(info) {
            alert(info['msg']);
        }
        function nativeClickrrrr() {
            alert('测试回调');
        }
    </script>
</head>
<body>
    <h1>MLXJSBridge</h1>
    <button onclick='clickcamera()'>打开相机</button>
    <div id='insert'></div>
</body>
</html>
<!--
 mlx.performMethod('cameraClick_paramName0_paramName1_',mycars,function (response) {
 var success = response['success'];
 if(!success){
 alert(response['msg']);
 return;
 }
 //response['data']：回调回来的照片数组
 var photos = response['data'];
 var insert = document.getElementById('insert');
 for(var i = 0; i < photos.length; i++) {
 var img = new Image(100,100);
 img.src = photos[i];
 insert.appendChild(img);
 }
 });
 -->
